pp108 : Inserting Lookup Pages

Inserting Lookup Pages

This topic describes the procedure to enable the lookup feature and specify lookup pages.

Before you begin this task:
You must create an XForm and publish it to run time to use it as the lookup page.

You can associate two XForms using the lookup feature so that clicking the lookup button of a control on an XFrom, opens the other in a separate lookup window.
Using this feature, you can display data in a control, while its detailed information is displayed in a separate lookup window. The lookup feature is supported for the Input, Output, Textarea, Code Snippet, List, and Select controls.

  1. Open the XForm in the XForms Designer.
  2. Double-click the control in the XForm. Alternatively, right-click the control and select Properties. The <control name> window appears in the XForms Designer.
  3. Click Zoom Properties in the <control name> window to expand the pane.
  4. Make appropriate modifications to specify zoom properties:
    • Type the URL of the lookup page (XForm) in the Zoom URL field. Alternatively, click , select the XForm in the Select URL dialog box that appears, and click OK. The URL displays in the Zoom URL field. This field is mandatory.
    • Type the XPath of the business attribute to be returned from the zoom page in the Zoom Field field. This field is mandatory.
    • Select an option from the Before Zoom drop-down list to specify the event handler (onbeforezoom) to be executed before the lookup page is opened. Alternatively, click to display the Script Editor and type the script for the event.
    • Select an option from the After Zoom drop-down list to specify the event handler (onafterzoom) to be executed after the lookup page is closed. Alternatively, click to display the Script Editor and type the script for the event.
      This sets the zoom properties for the control.
      When you click the lookup button in the preview or during run time, the event specified in the Before Zoom drop-down list is executed, and the lookup page appears.
      If you select an option or a check box in an open lookup page and click OK, the page closes, and the event specified in the After Zoom drop-down list is executed. The data associated with the selected option is retrieved and the application runs validations, if any, specified for the control. A message appears if the retrieved data fails validation. If the data clears the validation, the lookup window closes and the data is displayed in the control.

Note:

  • By default, the lookup page opens in a separate window at run time. However, you can modify the application definition to display the page in any framework position. Process Platform recommends that you do not modify the URL of the lookup XForm while exposing the application definition.
  • To preserve the positioning of controls during run time, ensure that the layout of the lookup XForm is vertical and that the controls are not anchored.